<template>
	<view class="">
	<view class="cat-box">
		<view class="cat" v-for="(item,index) in catgoryData" :key="item.cat_id">
			{{item.cat_name}}
		</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				catgoryData:[]
			}
		},
		methods: {
			
		},
		onLoad() {
			let catThis=this;
			uni.request({
				url:'https://x.dscmall.cn/api/catalog/list',
				method:'GET',
				success(res){
					console.log("请求成功"+res);
					catThis.catgoryData = res.data.data;
					console.log(res.data.data);
				}
			})
		}
	}
</script>

<style lang="less">
	.cat-box{
		width: 200rpx;
		height: 800px;
		background-color: #cccccc;
		.cat{
			height: 90rpx;
			line-height: 90rpx;
			text-align: center;
		}
	}

</style>
